Integrand size = 32, antiderivative size = 44 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {C \text {arctanh}(\sin (c+d x))}{a d}+\frac {(B-C) \tan (c+d x)}{a d (1+\sec (c+d x))} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4135, 3855, 12, 3879} \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {C \text {arctanh}(\sin (c+d x))}{a d}+\frac {(B-C) \tan (c+d x)}{a d (\sec (c+d x)+1)} \]
[In]
[Out]
Rule 12
Rule 3855
Rule 3879
Rule 4135
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {(a B-a C) \sec (c+d x)}{a+a \sec (c+d x)} \, dx}{a}+\frac {C \int \sec (c+d x) \, dx}{a} \\ & = \frac {C \text {arctanh}(\sin (c+d x))}{a d}+(B-C) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx \\ & = \frac {C \text {arctanh}(\sin (c+d x))}{a d}+\frac {(B-C) \tan (c+d x)}{d (a+a \sec (c+d x))} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(106\) vs. \(2(44)=88\).
Time = 0.62 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.41 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left (C \cos \left (\frac {1}{2} (c+d x)\right ) \left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+(B-C) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{a d (1+\cos (c+d x))} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.20
method | result | size |
parallelrisch | \(\frac {-C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (B -C \right )}{a d}\) | \(53\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) | \(61\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) | \(61\) |
risch | \(\frac {2 i B}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 i C}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{a d}\) | \(91\) |
norman | \(\frac {\frac {\left (B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}-\frac {\left (B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}+\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}\) | \(105\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.68 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {{\left (C \cos \left (d x + c\right ) + C\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (C \cos \left (d x + c\right ) + C\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (B - C\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
[In]
[Out]
\[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {B \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (44) = 88\).
Time = 0.23 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.25 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {C {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {B \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.59 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} + \frac {B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \]
[In]
[Out]
Time = 15.85 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.93 \[ \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {2\,C\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (B-C\right )}{a\,d} \]
[In]
[Out]